﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;

namespace TableTop.Presentation.Controls
{
    public class PanelStripe
        : ContentControl
    {
        #region Dependency Properties

        public static DependencyProperty TitleProperty = DependencyProperty.Register("Title",
                                                                                     typeof(String),
                                                                                     typeof(PanelStripe),
                                                                                     new PropertyMetadata("NewPanelStripe"));
        public static DependencyProperty OrientationProperty = DependencyProperty.Register("Orientation",
                                                                                           typeof(Orientation),
                                                                                           typeof(PanelStripe),
                                                                                           new PropertyMetadata(Orientation.Horizontal));        

        #endregion

        #region Properties

        public String Title
        {
            get
            {
                return (String)this.GetValue(TitleProperty);
            }

            set
            {
                this.SetValue(TitleProperty, value);
            }
        }

        public Orientation Orientation
        {
            get
            {
                return (Orientation)this.GetValue(OrientationProperty);
            }
            set
            {
                this.SetValue(OrientationProperty, value);
            }
        }        

        #endregion

        #region Constructors

        public PanelStripe()
        {
            this.ConstructorBase();
        }

        private void ConstructorBase()
        {
            //try
            //{
            //    DefaultStyleKeyProperty.OverrideMetadata(typeof(PanelStripe),
            //                                             new FrameworkPropertyMetadata(typeof(PanelStripe)));
            //}
            //catch (ArgumentException)
            //{
            //}          
            this.DefaultStyleKey = typeof(PanelStripe);
        }

        #endregion
    }
}
